package com.hrsoft.edi.stub.request;

import com.qimen.api.QimenRequest;
import com.qimen.api.response.InventoryQueryResponse;
import com.taobao.api.ApiRuleException;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.internal.mapping.ApiListField;
import com.taobao.api.internal.util.RequestCheckUtils;

import java.util.List;
import java.util.Map;

public class InventoryQueryRequest extends QimenRequest<InventoryQueryResponse>
{
    @ApiListField("criteriaList")
    @ApiField("criteria")
    private List<Criteria> criteriaList;
    private Map extendProps;
    private String remark;

    public InventoryQueryRequest() {
    }

    public void setCriteriaList(List<Criteria> criteriaList) {
        this.criteriaList = criteriaList;
    }

    public List<Criteria> getCriteriaList() {
        return this.criteriaList;
    }

    public void setExtendProps(Map extendProps) {
        this.extendProps = extendProps;
    }

    public Map getExtendProps() {
        return this.extendProps;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return this.remark;
    }

    public String getApiMethodName() {
        return "inventory.query";
    }

    public Class<InventoryQueryResponse> getResponseClass() {
        return InventoryQueryResponse.class;
    }

    public void check() throws ApiRuleException
    {
        RequestCheckUtils.checkMaxLength(this.remark, 500, "remark");
    }

    public static class Criteria {
        @ApiField("inventoryType")
        private String inventoryType;
        @ApiField("itemCode")
        private String itemCode;
        @ApiField("itemId")
        private String itemId;
        @ApiField("ownerCode")
        private String ownerCode;
        @ApiField("remark")
        private String remark;
        @ApiField("warehouseCode")
        private String warehouseCode;

        public Criteria() {
        }

        public String getInventoryType() {
            return this.inventoryType;
        }

        public void setInventoryType(String inventoryType) {
            this.inventoryType = inventoryType;
        }

        public String getItemCode() {
            return this.itemCode;
        }

        public void setItemCode(String itemCode) {
            this.itemCode = itemCode;
        }

        public String getItemId() {
            return this.itemId;
        }

        public void setItemId(String itemId) {
            this.itemId = itemId;
        }

        public String getOwnerCode() {
            return this.ownerCode;
        }

        public void setOwnerCode(String ownerCode) {
            this.ownerCode = ownerCode;
        }

        public String getRemark() {
            return this.remark;
        }

        public void setRemark(String remark) {
            this.remark = remark;
        }

        public String getWarehouseCode() {
            return this.warehouseCode;
        }

        public void setWarehouseCode(String warehouseCode) {
            this.warehouseCode = warehouseCode;
        }
    }
}
